package com.allst.dubbo.impl;

import com.allst.dubbo.service.WorkService;
import org.apache.dubbo.config.annotation.Service;

/**
 * @author June
 * @since 2021年04月
 */
@Service
public class WorkServiceImpl implements WorkService {
    @Override
    public void methodA() {
        long times = (long) (Math.random() * 100);
        try {
            Thread.sleep(times);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("methodA sleep : " + times + "`ms");
    }

    @Override
    public void methodB() {
        long times = (long) (Math.random() * 100);
        try {
            Thread.sleep(times);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("methodB : " + times + "`ms");
    }

    @Override
    public void methodC() {
        long times = (long) (Math.random() * 100);
        try {
            Thread.sleep(times);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("methodC : " + times + "`ms");
    }
}
